﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormsApp1
{
    public delegate void MyDelegate(int id,
                                    string customer,
                                    int sum,
                                    string productName,
                                    int quantity,
                                    int price);
    public partial class Form2 : Form
    {
        public event MyDelegate MyEvent;
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MyEvent(Int32.Parse(textBox1.Text),
                        textBox2.Text,
                        Int32.Parse(textBox3.Text),
                        textBox4.Text,
                        Int32.Parse(textBox5.Text),
                        Int32.Parse(textBox6.Text));
            this.Close();
        }
    }
}
